package com.learn.algorithm.designpattern.builder;

/**
 * @author wangxing
 * @version 2020/8/20 6:46 Administrator
 */
public class DefaultTempBeanBuilder implements ITempBeanBuilder{
    private TempBean tempBean;
    public DefaultTempBeanBuilder() {
        tempBean = new TempBean();
    }

    @Override
    public ITempBeanBuilder builderTemp1B(Temp1B temp1B) {
        tempBean.setTemp1B(temp1B);
        return this;
    }

    @Override
    public ITempBeanBuilder builderTemp2B(Temp2B temp2B) {
        tempBean.setTemp2B(temp2B);
        return this;
    }

    @Override
    public ITempBeanBuilder builderTemp3B(Temp3B temp3B) {
        tempBean.setTemp3B(temp3B);
        return this;
    }

    @Override
    public Object builder() {
        return tempBean;
    }
}
